package com.nkzy.controller;

import com.nkzy.domain.User;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.ArrayList;
import java.util.List;

@Controller
public class UserController {
    @GetMapping("/show")
    public String showUsers(Model model){
        List<User> list=new ArrayList<>();
        list.add(new User("admin01","F","19"));
        list.add(new User("admin02","M","20"));
        list.add(new User("admin03","F","21"));
        list.add(new User("admin04","M","22"));
        model.addAttribute("list",list);
        return "userList";
    }
}
